@0xe81f55d10c824972;

struct Map(Key, Value) {
  entries   @0  :List(Entry);
  struct Entry {
    key     @0  :Key;
    value   @1  :Value;
  }
}

struct PeerHttpParts{
  method      @0  :Text;
  uri         @1  :Text;
  version     @2  :Text;
  headers     @3  :Map(Text, Text);
  extensions  @4  :Map(Text, Text);
}

struct PeerHttpRequest {
  peerId      @0  :Text;
  routers     @1  :List(Text);
  head        @2  :PeerHttpParts;
  body        @3  :Data;
}

struct PeerHttpResponse {
  status      @0  :UInt16;
  headers     @1  :Map(Text, Text);
  body        @2  :Data;
}

struct RequestMetaData{
  action      @0  :Action;
  enum Action {
    socket    @0;
    command   @1;
  }
}